#Dockerfile
#制定node镜像的版本
FROM node:18-alpine
#移动当前目录下面的文件到app目录下
ADD . /app/
#进入到app目录下面，类似cd
WORKDIR /app
#安装依赖
# RUN npm config set registry https://registry.npmmirror.com/ && \    
#     npm i
# RUN apk add --no-cache yarn

# 设置Yarn的registry并安装依赖
RUN yarn config set registry https://registry.npmmirror.com/ && \
    yarn install

RUN npx prisma generate

RUN yarn build

RUN chmod +x startup.sh

#对外暴露的端口
EXPOSE 3000
#程序启动脚本
# CMD ["yarn", "start"]
ENTRYPOINT ["sh", "startup.sh"]